'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // router.get('/', controller.home.index);


  //验证码
  router.get('/egg/verif', controller.user.verif);

  //注册==>
  //
  router.post('/egg/register', controller.user.register);


  //登录
  //xxxxx
  router.post('/egg/login', controller.user.login);


  //获取用户信息
  router.get('/egg/userinfo', controller.user.userinfo);


  //添加商品
  router.get('/egg/sub', controller.home.sub);

  //获取商品
  router.get('/egg/getgoods', controller.home.getgoods);

  //获取商品数量
  router.get('/egg/goodstotal', controller.home.goodstotal);

  //通过gid获取商品信息
  router.get('/egg/detail', controller.home.detail);

  //通过gid获取商品评论
  router.get('/egg/getreport', controller.home.getreport);

  //通过gid设置商品评论
  router.get('/egg/setreport', controller.home.setreport);

};
